home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / C++ A'Link Files / 1990 / Sep 90 / CPlus.Dev$ 9⁄21⁄90 / 0210-C++ bug,missing feat-Sep90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  2.1 KB  |  56 lines  |  [TEXT/GEOL]

  1. Item    5339515                         20-Sept-90        18:21PDT
  2.  
  3. From:   MM.XOBJ                         MacroMind, XObject Support,PRT
  4.  
  5. To:     TIM.SWIHART                     Swihart, Tim
  6.         CPLUS.DEV$                      C++ Interest List--Developers
  7.         CPLUS.APPLE$                    C++ Interest List--Apple Employees
  8.  
  9. Sub:    C++ bug,missing feature, or ?
  10.  
  11. Is this a Bug, Missing Feature, or misunderstanding?
  12.  
  13. Could you help me decode the true meaning of this message:
  14.  
  15.     File "Derived.h"; line 18 # sorry, not implemented:  public specification
  16.     of overloaded Base::Base()
  17.  
  18. Is MPW C++ telling me that it falls short of 2.0 C++ in respect to member
  19. access modifiers?  Is this just a problem with respect to modifying access to
  20. overloaded members?  (Which Ellis and Stroustrup, page 246, say is dandy.)
  21.  
  22. In my case I am using a
  23.  
  24.     class Derived : private Base { .... };
  25.  
  26. The derived class "Derived" is privately derived from "Base" so that it may put
  27. some constraints on Derived, ensuring that it cannot be operated at too low a
  28. level by clients of Derived.  (Many individual Base operations would violate
  29. class invariants for class Derived).
  30.  
  31. Is this a bug? If so, is it expected to be fixed in MPW C++ 3.1 Final?  And is
  32. there a workaround of some kind?
  33.  
  34. By the way, I resorted to access modifiers in the first place, in an attempt to
  35. fix a different problem. I could not construct a Derived object, because the
  36. compiler complained:
  37.  
  38.     File "DerivedTest.cp"; line 175 # error:  main() cannot access __nw : Base
  39.     is a private base class
  40.  
  41.  
  42. Please respond with an explanation of why this is a problem, and what I can do
  43. (if there is anything short of  public derivation).  Should I stick with
  44. totally private derivation, and use my Derived class constructor to *MANUALLY*
  45. call the constructor of the base class?  (And wouldn't that break if the class
  46. was switched to be publicly derived in the future?  It is important not to
  47. redundantly construct the object, since it involves subordinate memory
  48. allocations.)
  49.  
  50. ANy help or insights appreciated,
  51.  
  52. Haim Zamir
  53. MacroMind, Inc.
  54. AppleLink MM.XOBJ
  55.  
  56.